package no.ntnu.item.ttm4115.termproject.positionagent;

import no.ntnu.item.ttm4115.termproject.GetPositionManually;
import no.ntnu.item.ttm4115.termproject.Position;
import no.ntnu.item.ttm4115.termproject.GetPositionAuto;
import no.ntnu.item.ttm4115.termproject.GpsCoords;


public class PositionAgentActions extends Object {

	public static void initialize(PositionAgentSM asm){
	}

	public static void sendPosition(GetPositionManually signal, PositionAgentSM asm){
		System.out.println("skriver ut i positionAgent");
		System.out.println(asm.longi);
		System.out.println(asm.lati);
		asm.sendMessage(new Position(asm.lati, asm.longi), signal.getSenderRole());
	}

	public static void AutoUpdatePosition(GetPositionAuto signal, PositionAgentSM asm){
	    // 
	asm.sendMessage(new Position(asm.lati,asm.longi), signal.getSenderRole());
	}

	public static void updatePosition(GpsCoords signal, PositionAgentSM asm){
	    asm.lati = signal.lati;
	    asm.longi = signal.longi;
	}
}
